package com.ruoyi.business.domain;


import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import javax.persistence.*;
import java.math.BigDecimal;

@Entity
@Table(name = "cardetail")
@Data
public class Cardetail extends BaseEntity {

    private static final long serialVersionUID = 855066681155L;

    /**  */
    @Id
    @Column(name="id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;


    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "mainid", foreignKey = @ForeignKey(value = ConstraintMode.NO_CONSTRAINT))
    @NotFound(action = NotFoundAction.IGNORE)
    private  CarMain  mainid;


    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "cinvcode", foreignKey = @ForeignKey(value = ConstraintMode.NO_CONSTRAINT))
    @NotFound(action = NotFoundAction.IGNORE)
    private  Inventory cinvcode;



   @Column(name = "ordernum")
    private BigDecimal orderNum;

    @Excel(name = "")
    @Column(name="irowno")
    private Long irowno;


}
